import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    // mode: "history",
    routes: [
        {
            path: '/',
            redirect: '/dashboard'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/pages/Home.vue'),
            meta: {title: '主页'},
            children: [
                {
                    path: '/dashboard',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/pages/Dashboard'),
                    meta: {title: '系统首页'}
                },
                {
                    path: '/gameMode',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/pages/GameModeHome'),
                    meta: {title: '掌机模式'}
                },
                {
                    path: '/digitalRadio',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/pages/DigitalRadio'),
                    meta: {title: '掌机模式'}
                },
            ]
        },
    ]
});
